<template>
  <div id="loadmain">
    <ul>
      <li v-for="(value,key,index) in booksinfo" :key="index">
        <div @touchstart="gobookcontent">
          <img :src="value.img" alt />
          <img class="loadimg" src="@/assets/书架/u4216.png" alt />
        </div>
        <div>
          <p @touchstart="gobookcontent">{{value.name}}</p>
          <p @touchstart="gobookcontent">{{value.author}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      booksinfo: {
        book1: {
          img: require("@/assets/书架/u1744.png"),
          name: "浮",
          author: "曹雪芹"
        },
        book2: {
          img: require("@/assets/书架/u1715.png"),
          name: "也许 你该找人聊聊",
          author: "曹雪芹"
        },
        book3: {
          img: require("@/assets/书架/u1727.png"),
          name: "从零开始的女权主义",
          author: "曹雪芹"
        }
      }
    };
  },
  methods:{
    gobookcontent(){}
  }
};
</script>

<style lang="less" scoped>
#loadmain {
  ul {
    list-style: none;
    
    li {
      display: flex;
      margin-bottom: 1.5rem;
      div{
        &:first-of-type{
          position: relative;
          .loadimg{
            position: absolute;
            right: -0.1rem;
            bottom: .3rem;
          }
        }
        &:last-of-type{
          margin-left: 1rem;
          margin-top: .5rem;
          p {
          &:first-of-type {
            font-family: "PingFangSC-Semibold", "PingFang SC Semibold",
              "PingFang SC";
            font-weight: 650;
            font-style: normal;
            font-size: 1.5rem;
            color: #2b3133;
            text-align: left;
            margin-bottom: 1rem;
          }
          &:last-of-type {
            font-family: "PingFangSC-Regular", "PingFang SC";
            font-weight: 400;
            font-style: normal;
            font-size: 1.2rem;
            color: #95a1a6;
            text-align: left;
          }
        }
        }
      } 
    }
  }
}
</style>